<page-header [autoTitle]="false"></page-header>
<nz-card [nzBordered]="false">
  <section class="search-section">
    <input nz-input placeholder="收款人" [(ngModel)]="keyword" class="search-item"/>
    <button nz-button [nzType]="'primary'" nzGhost (click)="search()"  class="search-item">
    <i class="anticon anticon-search"></i><span>搜索</span>
    </button>
  </section>
  <nz-table #nzTable [nzData]="page.content"
            [nzPageSize]="page.size"
            [nzTotal]="page.totalElements"
            [nzFrontPagination]="false"
            [(nzPageIndex)]="page.number"
            (nzPageIndexChange)="changePageNo($event)"
            [nzLoading]="isLoading">
    <thead>
    <tr>
      <th>序号</th>
      <th><span>收款人</span></th>
      <th>金额</th>
      <th>发放时间</th>
      <th>备注</th>
      <th>是否发放成功</th>
      <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let data of nzTable.data;let i=index">
      <td>
        {{i+1}}
      </td>
      <td >{{data.cusName}}</td>
      <td>{{(data.amount/100).toFixed(2)}}</td>
      <td>{{data.saveDate}}</td>
      <td style="max-width: 180px;" [title]="data.remark">{{data.remark|stringEllipsisCutPipe:13}}</td>
      <td style="max-width: 200px;">{{data.payStatus|yesNoPipe}}<span *ngIf="data.payStatus == 2 && data.amount != '0'" [title]="data.errCodeDes">({{data.errCodeDes?(data.errCodeDes|stringEllipsisCutPipe:16):"未发放"}})</span></td>
      <td >
        <nz-popconfirm [nzTitle]="'确定重新发放奖励吗？'" (nzOnConfirm)="reSend(data)">
          <a nz-popconfirm *ngIf="data.payStatus == 2 && data.amount != '0'">补发</a>
        </nz-popconfirm>
      </td>
    </tr>
    </tbody>
  </nz-table>
</nz-card>
